using System;
using System.Collections.Generic;
using VotingSystem.Models;

namespace VotingSystem.ViewModels
{
    public class SurveyStatisticsViewModel
    {
        public int TotalResponses { get; set; }
        public bool IsAnonymous { get; set; }
        public List<RespondentInfo>? Respondents { get; set; }
        public List<QuestionStatistics> QuestionStatistics { get; set; } = new List<QuestionStatistics>();
    }

    public class RespondentInfo
    {
        public int ResponseId { get; set; }
        public string UserName { get; set; } = string.Empty;
        public DateTime SubmitTime { get; set; }
        public int? AnonymousIndex { get; set; }
    }

    public class QuestionStatistics
    {
        public int QuestionId { get; set; }
        public string QuestionText { get; set; } = string.Empty;
        public QuestionType Type { get; set; }
        public List<OptionStatistics> Options { get; set; } = new List<OptionStatistics>();
        public List<string>? TextResponses { get; set; }
        public List<int?> RatingResponses { get; set; }
    }

    public class OptionStatistics
    {
        public int OptionId { get; set; }
        public string OptionText { get; set; } = string.Empty;
        public int Count { get; set; }
    }
} 